<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

</body>
<script>


    var obj = {
        a:1,
        b:2
    };

    console.log(Object.keys(obj),Object.values(obj));


</script>
</html>